Constraints with N around 1000
Do O(N log N) binary search N times.
---
This page is auto-translated from /nishio/N が 1000 前後の制約. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers.